Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

kes: add support for API key authentication - #340

Open
aead wants to merge 1 commit into
masterfrom
kes-keystore-apikey
Open

kes: add support for API key authentication#340
aead wants to merge 1 commit into
masterfrom
kes-keystore-apikey

Conversation

@aead

@aead aead commented Mar 7, 2023

Copy link
Copy Markdown
Member

This commit adds support for KES<->KES authentication via API keys. Now, a KES edge server can authenticate to a KES server (stateful) via API keys - not just via TLS private key / certificate files.

@aead
aead requested review from Praveenrajmani and taran-p March 7, 2023 15:09
@aead
aead force-pushed the kes-keystore-apikey branch from 2e9ab7a to af404e0 Compare March 7, 2023 15:09
case config.APIKey != nil:
cert, err = kes.GenerateCertificate(config.APIKey)
if err != nil {
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we return the error here?

@kannappanr
kannappanr requested a review from shtripat April 18, 2023 19:36

@shtripat shtripat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment. Also how to verify the changes?

Comment thread internal/keystore/kes/kes.go Outdated
if config.PrivateKey == "" {
return nil, errors.New("kes: no private key provided")
if config.APIKey != nil && (config.PrivateKey != "" || config.Certificate != "") {
return nil, errors.New("kes: ambiguous configuration: API key as well as mTLS private key and certificate provided")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API key as well as mTLS private key and/or certificate provided ?

@aead
aead force-pushed the kes-keystore-apikey branch from af404e0 to effeabc Compare April 24, 2023 10:18
This commit adds support for KES<->KES authentication
via API keys. Now, a KES edge server can authenticate
to a KES server (stateful) via API keys - not just
via TLS private key / certificate files.

Signed-off-by: Andreas Auernhammer <hi@aead.dev>
@aead
aead force-pushed the kes-keystore-apikey branch from effeabc to 2170223 Compare April 24, 2023 10:19
@shtripat

Copy link
Copy Markdown
Contributor

Please resolve the conflict and add steps for verification. I feel we can add a wiki for the this mechanism of API keys authentication, right?

@allanrogerr

Copy link
Copy Markdown

@aead PTAL

@bh4t bh4t added the new-feature This PR implements a new feature label Jan 20, 2024
@harshavardhana
harshavardhana force-pushed the master branch 3 times, most recently from f832434 to 63649d0 Compare May 27, 2025 18:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

new-feature This PR implements a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants